﻿using Game.Terrain;
using UnityEditor;
using UnityEngine;

namespace Game.TerrainEditor
{
    [CustomEditor(typeof(Build))]
    public class BuildEditor : MapEntityBaseEditor
    {
        private string _iconPath = "Assets/Editor/Editor Resources/Icon/Build.png";

        protected override string IconPath
        {
            get
            {
                if (EntityTile.tileSprite)
                {
                    _iconPath = AssetDatabase.GetAssetPath(EntityTile.tileSprite);
                }

                return _iconPath;
            }
            set => _iconPath = value;
        }

        public override void OnEnable()
        {
            //SetIcon(IconPath);
           base.OnEnable();
        }


        public override void OnInspectorGUI()
        {
           // SetIcon(IconPath);
            // 调用基类的 Inspector 绘制方法，显示默认的 Tile 属性
            base.OnInspectorGUI();
        }
    }
}